package com.coachtam.ljgcapi.consumer;

import org.springframework.cloud.gateway.filter.factory.HystrixGatewayFilterFactory;
import org.springframework.stereotype.Component;

import java.util.function.Consumer;

/**
 * @Copyright (C), 2018-2020
 * @Author: JAVA在召唤
 * @Date: 2020-08-05 06:48
 * @Description:
 */
@Component
public class HystrixConsumer implements Consumer<HystrixGatewayFilterFactory.Config> {
    @Override
    public void accept(HystrixGatewayFilterFactory.Config config) {
        config.setName("hystrix");
        config.setFallbackUri("forward:/fallback");
    }
}
